div{
    animation: dance 2s ease-in-out  1 normal paused;
}
@keyframes dance {
    from{
        transform: translateY(0);
        opacity: 1;
    }
    33%{
        transform: translateY(-0.5%);
        opacity: .7;
    }
    66%{
        transform: translateY(0.5%);
        opacity: .7;
    }
    to{
        transform: translateY(0);
        opacity: 1;
    }
}